package com.dahuyou.netty.cluster;

import com.dahuyou.netty.cluster.redis.RedisUtil;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import javax.annotation.Resource;

@SpringBootApplication
@ComponentScan("com.dahuyou.netty")
public class ClusterApplication implements CommandLineRunner{

    @Resource
    private RedisUtil redisUtil;

    public static void main(String[] args) {
        SpringApplication.run(ClusterApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        redisUtil.clear();
    }

}
